package net.csdn.business.discuss.feign.api;


import net.csdn.business.discuss.common.constant.ServiceNameConstants;
import net.csdn.business.discuss.common.model.dto.UserRoleDto;
import net.csdn.business.discuss.common.model.vo.UserInfoVO;
import net.csdn.business.discuss.feign.decoder.SystemFeignErrorDecoder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @Auther: zhangyalei
 * @Date: 2022/12/21 16:59
 * @Description:
 */
@FeignClient(value = ServiceNameConstants.ATOMGIT_SYSTEM_SERVICE,contextId = ServiceNameConstants.ATOMGIT_SYSTEM_USER_CONTEXT_ID,  configuration = SystemFeignErrorDecoder.class)
public interface UserFeignClient {


    /**
     * @Desc: 批量查询用户信息
     * @Author: zhangyalei
     * @Date: 2023/1/11 15:18
     */
    @PostMapping("/api/v1/user/batchQuery")
    public Map<String, UserInfoVO> batchQuery(@RequestBody List<String> userIds);


    @PostMapping("/api/v1/user/batchQuery/username")
    public Set<String> batchQueryByUsername(@RequestBody List<String> usernames);

}